<%@ taglib prefix="s" uri="/struts-tags" %>
<body>
<script type='text/javascript'>
$(document).ready(function() {
	 
	$("#tabView").tabs({
	    select: function(event, ui) {
	        var url = $.data(ui.tab, 'load.tabs');
	        if( url ) {
	            location.href = url;
	            return false;
	        }
	        return true;
	    },
	    selected: 0
	    
	});
 
});
</script>

   <div id="container">    
      <div id="center">
      <jsp:include page="/WEB-INF/template/subHeader.jsp" />    
         <div id="tabView">
            <ul>
               <li><a href="#detailTab">Add Survey</a></li>
               <li><a href="<s:url value="/example/question.action" />">Add Questions</a></li>
            </ul>
            
            <div id="detailTab">                  
               <s:actionerror />
               <s:form namespace="/example" action="add" id="entity">
               <s:textfield name="name" label="%{getText('label.entity.name')}" size="15" maxlength="20" required="true" />
               <s:textfield name="vxml" label="%{getText('label.entity.vxml')}" size="30" maxlength="255" required="true"/>
               <s:textfield name="numberOfQuestions" label="%{getText('label.entity.numberOfQuestions')}" size="4" maxlength="2" required="true" />
               <s:select name="category" label="%{getText('label.entity.category')}" list="categoryList" listKey="id" listValue="name"  />
               <s:select name="type" label="%{getText('label.entity.type')}" list="surveyTypeList"  />
               <s:radio name="voiceRecording" label="%{getText('label.entity.voiceRecording')}" list="#{'0':'No','1':'Yes'}" value='0' />
               <s:radio name="resultFollowup" label="%{getText('label.entity.resultFollowup')}" list="#{'false':'No','true':'Yes'}" value='false' />
               <s:radio name="displayResultAverage" label="%{getText('label.entity.displayResultAverage')}" list="#{'false':'No','true':'Yes'}" value='false' />
               <table>         
                  <tr>
                     <td colspan="2">
                        <br />
                        <s:submit value="Save" theme="simple" /> &nbsp; <input type="submit" value="Cancel" onclick="location.href='<s:url namespace="/example" action="list" includeParams="none" />'; return false;" />
                     </td>
                  </tr>
               </table>           
               </s:form>
            </div>
         </div>
      </div>
   </div>
</body>

